<template>
    <el-row>
        <el-col :span="24">
            <el-table :data="checkRequestList" 
		          stripe 
				  border
				  @selection-change="handleSelectionChange">
                    <el-table-column type="selection"  width="55" />
                    <el-table-column type="index" width="50" />
                    <el-table-column prop="medicalTechnology.techName" label="项目名称" width="180" />
                    <el-table-column prop="medicalTechnology.techPrice" label="价格" width="100"/>
                    <el-table-column prop="checkInfo" label="检查描述" width="180"/>
                    <el-table-column prop="checkPosition" label="检查部位" width="180"/>
                    <el-table-column prop="checkState" label="状态" width="100"/>
                    <el-table-column label="操作" width="180">
                        <template #default="{row}" >
                            <el-button 
                                @click="handleDelete(row.id)" 
                                v-if="row.checkState=='已开立'"
                            >进行检查</el-button>
                        </template>
                    </el-table-column>
		</el-table>
        </el-col>
    </el-row>
</template>

<script setup>
import httpRequest from '../../common/index.js';
import { onMounted, ref, getCurrentInstance, computed, watch } from 'vue';
import { ElMain, ElMessage,ElMessageBox } from 'element-plus';

const {proxy} = getCurrentInstance();

const checkRequestList = ref([]);

//查询需要进行的检查  状态是已缴费的
const getCheckRequestList = ()=>{
    httpRequest(
        proxy,
        'get',
        '/checkrequest/state/已缴费',
        null,
        resultBean=>{
            checkRequestList.value = resultBean.data;
        }
    )
}

onMounted(()=>{
    getCheckRequestList();
})

</script>

<style>
</style>